package com.alinesno.cloud.gateway.enable;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 引入自动类
 * @author WeiXiaoJin
 * @sine 2019年4月5日 下午3:34:07
 */
public class GatewayConfigurationSelector implements ImportSelector {

	@Override
	public String[] selectImports(AnnotationMetadata importingClassMetadata) {
		List<String> importBean = new ArrayList<String>() ; 
		
//		BeanDefinitionRegistry registry = new SimpleBeanDefinitionRegistry() ; 
//		ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(registry) ; 
//		Set<BeanDefinition> beans = scanner.findCandidateComponents("com.alinesno.cloud.gateway.core") ; 
//		
//		for(BeanDefinition b : beans) {
//			importBean.add(b.getBeanClassName()) ; 
//		}
//		
//		importBean.add(ApplicationContextProvider.class.getName()) ;
		
		return importBean.toArray(new String[] {}) ;
	}

}
